import { Module } from '@nestjs/common';
import { UserController } from './user.controller';
import { UserService } from './user.service';
import { PrismaModule } from './middleware/prisma/prisma.module';
import { SvgModule } from './middleware/svg/svg.module';
import { RedisModule } from './middleware/redis/redis.module';
import { EmailModule } from './middleware/email/email.module';
import { PlateModule } from './views/plate/plate.module';
import { MessageModule } from './views/message/message.module';
import { JwtsModule } from '@app/jwts';
import { APP_GUARD } from '@nestjs/core';
import { AuthService } from '@app/auth';
import { NacosConfigModule } from '@app/nacos-config';
import { NacosRegisterModule } from '@app/nacos-register';
import { EtcdConfigModule } from '@app/etcd-config';
import { EtcdRegisterModule } from '@app/etcd-register';

@Module({
  imports: [
    PlateModule,
    MessageModule,
    PrismaModule,
    JwtsModule,
    SvgModule,
    RedisModule,
    EmailModule,
    NacosConfigModule,
    NacosRegisterModule,
    EtcdConfigModule,
    EtcdRegisterModule,
  ],
  controllers: [UserController],
  providers: [
    UserService,
    {
      provide: APP_GUARD,
      useClass: AuthService,
    },
  ],
})
export class UserModule {}
